﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="changepassword.aspx.cs" Inherits="lgweb.user.changepassword" %>

<%@ Register Src="~/control/header.ascx" TagName="header" TagPrefix="uc1" %>
<%@ Register Src="~/control/footer.ascx" TagName="footer" TagPrefix="uc2" %>
<%@ Register src="~/control/user/Menu.ascx" tagname="Menu" tagprefix="uc3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>修改密码 - 当事人通道 - 深圳市龙岗区人民法院网站</title>
    <meta content="龙岗区人民法院,深圳市龙岗区人民法院网站" name="keywords" />
    <meta content="龙岗区人民法院,深圳市龙岗区人民法院网站" name="description" />
    <link href="/favicon.ico" type="image/x-icon" rel="Bookmark" />
    <link href="/favicon.ico" type="image/x-icon" rel="shortcut icon" />
    <link href="/css/base.css" rel="stylesheet" type="text/css" />
    <link href="/css/user/user.css" rel="stylesheet" type="text/css" />
    <script src="/js/common/base.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="g_body">
        <uc1:header ID="header1" runat="server" />
        <div class="g_content">
            <div class="g_d231">
                <uc3:Menu ID="Menu1" runat="server" />
            </div>
            <div class="g_d708r">
                <div class="g_box708">
                    <div class="s_title">当前位置：<a href="/index.aspx">首页</a> > <a href="/user/index.aspx">当事人通道</a> > 修改密码</div>
                    <div class="s_box">
                        <div class="g-hspace20"></div>
                        <table cellpadding="0" cellspacing="0" class="g_detail w670 clear">
                            <tr>
                                <th width="180">旧密码：</th>
                                <td><input type="password" value="" class="txt w160" id="txtOldPwd" runat="server" /></td>
                            </tr>
                            <tr>
                                <th width="180">新密码：</th>
                                <td><input type="password" value="" class="txt w160" id="txtNewPwd" runat="server" /></td>
                            </tr>
                            <tr>
                                <th width="180">重复新密码：</th>
                                <td><input type="password" value="" class="txt w160" id="txtNewConfrimPwd" runat="server" /></td>
                            </tr>
                            <tr>
                                <td width="180"></td>
                                <td>
                                    <asp:Button ID="Button1" runat="server" Text="修改密码" CssClass="btn_gray" 
                                        onclick="Button1_Click" OnClientClick="return CheckInfo();" />
                                    <input type="button" value="取消" onclick="window.location.href='/user/index.aspx';" class="btn_gray mgl10"  /></td>
                            </tr>
                            <tr>
                                <td colspan="2" runat="server" id="tdMessages" class="red g-fz-14"></td>
                            </tr>
                        </table>
                        
                    </div>
                    <div class="s_ft">
                    </div>
                </div>
            </div>
            
            
            
        </div>
        <uc2:footer ID="footer1" runat="server" />
    </div>
    </form>
</body>
</html>
<script type="text/javascript">
    function CheckInfo() {
        var sName = document.getElementById("txtOldPwd").value;
        var re = /^^[a-zA-Z0-9\-]{5,15}$|^[a-zA-Z0-9\-]{5,15}\.[a-zA-Z0-9\-]{5,15}$/;
        if (!re.test(sName)) {
            alert("旧密码必须为大于5小于15个字符.不能使用特殊字符！");
            return false;
        }

        var sPassword = document.getElementById("txtNewPwd").value;
        var re1 = /^^[a-zA-Z0-9\-]{5,15}$|^[a-zA-Z0-9\-]{5,15}\.[a-zA-Z0-9\-]{5,15}$/;
        if (!re1.test(sPassword)) {
            alert("新密码必须为大于5小于15个字符.不能使用特殊字符！");
            return false;
        }

        var sConfrimPassword = document.getElementById("txtNewConfrimPwd").value;
        var re2 = /^^[a-zA-Z0-9\-]{5,15}$|^[a-zA-Z0-9\-]{5,15}\.[a-zA-Z0-9\-]{5,15}$/;
        if (!re2.test(sConfrimPassword)) {
            alert("重新输入密码必须大于5小于15个字符.不能使用特殊字符！");
            return false;
        }

        if (sPassword != sConfrimPassword) {
            alert("密码不一致，请检查二次密码是否输入一致！");
            return false;
        }

        return true;
    }

</script>